import request from '@/config/axios'
import { pa } from 'element-plus/es/locale'

// 农舍导览 API
export const farmHouseExpend = {
  // 获取农舍导览消耗数据
  getHosueExpendApi: async (params) => {
    return await request.get({ 
      url: `farm/house/getConsumeDataByFarmHouseId`,
      params
    })
  },
  // 获取天气
  getHouseWeather: async (params: any) => {
    return await request.get({ 
      url: `farm/house/getWeather`,
      params
    })
  },
  // 获取近24H数据曲线
  getHosueData24hApi: async (params) => {
    return await request.get({ 
      url: `/farm/house/getFarmHouseDataLast24h`,
      params
    })
  },
  // 设备运行状态
  getHouseWarn: async (params: any) => {
    return await request.get({ 
      url: `farm/house/getFarmHouseDeviceStatus`,
      params
    })
  },
  // 实时告警
  getNowHouseWarnApi: async (params: any) => {
    return await request.get({ 
      url: `farm/house/getDeviceAlarmNowByFarmHouseId`,
      params
    })
  },
  // 基础信息
  getBaseInfoApi: async (params: any) => {
    return await request.get({ 
      url: `farm/house/getFarmHouseOverview`,
      params
    })
  },
  // 风机
  getWindApi: async (params: any) => {
    return await request.get({ 
      url: `farm/house/getTerminalStatus`,
      params
    })
  },
  // 农舍下拉列表
  getHouseListApi: async (params: any) => {
    return await request.get({ 
      url: `/farm/house/getFarmAndFarmhouseList`,
      params
    })
  },
  // 获取产蛋数量
  getEggNumApi: async (params: any) => {
    return await request.get({ 
      url: `farm/house/getTodayEggByFarmHouse`,
      params
    })
  },
  // 获取耗水
  getTodayWaterApi: async (params: any) => {
    return await request.get({ 
      url: `/farm/house/getConsumeWaterByFarmHouseId`,
      params
    })
  },
  // 获取耗料
  getTodayConsumeApi: async (params: any) => {
    return await request.get({ 
      url: `/farm/house/getConsumeWeightByFarmHouseId`,
      params
    })
  },
  //获取耗电
  getTodayElectricityApi: async (params: any) => {
    return await request.get({ 
      url: `/farm/house/getConsumeElectricityConsumeByFarmHouseId`,
      params
    })
  },
}
